-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(anvil
): mostly remove EthTransactionRequest usage, migrate AccessListTracer
#6776
Conversation
request.data.as_ref().map(|data| data.as_ref().is_empty()).unwrap_or(true); | ||
// If the request is a simple native token transfer we can optimize | ||
// We assume it's a transfer if we have no input data. | ||
let likely_transfer = request.input.clone().into_input().is_none(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let likely_transfer = request.input.clone().into_input().is_none(); | |
let likely_transfer = request.input.input().is_none(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 ^
pub fn alloy_to_revm_access_list(list: Vec<AlloyAccessListItem>) -> Vec<(Address, Vec<U256>)> { | ||
list.into_iter() | ||
.map(|item| (item.address, item.storage_keys.into_iter().map(|k| k.into()).collect())) | ||
.collect() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should ideally make the Alloy Access List compatible with the Revm type directly or with a .into() impl
request.data.as_ref().map(|data| data.as_ref().is_empty()).unwrap_or(true); | ||
// If the request is a simple native token transfer we can optimize | ||
// We assume it's a transfer if we have no input data. | ||
let likely_transfer = request.input.clone().into_input().is_none(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 ^
Motivation
Part of #6715.
Solution
Removes
EthTransactionRequest
usage everywhere where its capability to produceTypedTransaction
s is not required, as this type will be migrated later along with typed receipt, and the block types. This removes a bunch of conversions throughout the API / in-mem backend. Also migrates theAccessListTracer
.